QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

# 用于判断当前使用的Qt版本主版本号是否大于5，如果是，则执行冒号后面的QT += core5compat语句，
# 将core5compat模块添加到项目中
# 兼容性支持：core5compat模块是为了在Qt 6中提供与Qt 5兼容的API。
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat


CONFIG += c++17

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

TARGET = MyImageSwitchButton # 1.指定生成的目标文件名
TEMPLATE = app
DESTDIR = $$PWD/bin
CONFIG += warn_off

SOURCES += \
    main.cpp \
    qmyimagebutton.cpp \
    qmyswitchbutton.cpp

HEADERS += \
    qmyimagebutton.h \
    qmyswitchbutton.h

FORMS += \
    qmyswitchbutton.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += \
    Image.qrc
